/*
 * Copyright (C) 2010 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hisense.settings;

import static com.google.android.tv.settings.TvSettings.System.SCREEN_DIM_TIMEOUT;
import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT;
import static android.provider.Settings.System.SOUND_EFFECTS_ENABLED;

import com.android.settings.R;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.media.AudioManager;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.provider.Settings;
import android.preference.PreferenceScreen;

import java.util.List;
import android.util.Log;
import java.util.Map;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
import android.content.DialogInterface;

import com.hisense.settings.util.Wrapper;
/*import com.marvell.willowtv.framework.features.ParentalControl;
import com.marvell.willowtv.framework.features.TvFramework;
import com.marvell.willowtv.framework.util.atsc.PCEnumClass.RegionId;*/
import android.content.Intent;



/**
 * Handles settings menu for open v-chip settings.  
 *
 * @author huangjiufa
 */
public class OpenVChipSettings extends PreferenceActivity implements
        Preference.OnPreferenceChangeListener{
   
    private static final String TAG = "OpenVChipSettings";
    //private final ParentalControl mParentalControl = TvFramework.getInstance().getParentalControlInstance();

	
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        addPreferencesFromResource(R.xml.open_vhip_lock_settings);
		getDRRTDimension();

    }
	
	private void getDRRTDimension () {
        /*RegionId region = RegionId.REG_DRRT;
		Log.d(TAG, "&&&&&&&&&&%%%%%%%%%%% region=" + region);
        int numDimension = mParentalControl.getNumDimensionsAvailable(region.ordinal());
        for(int i = 0;i < numDimension;i++) {
        	String dimensionName = mParentalControl.getDimensionName(region, i);
        	
			Log.d(TAG, "&&&&&&&&&&%%%%%%%%%%% dimensionName=" + dimensionName);
			
			Intent intent = new Intent(this, DynamicDimensionActivity.class);
			intent.putExtra(DynamicDimensionActivity.CURRENT_POSITION, i);
			
			Preference dPref = new Preference(this);
			dPref.setTitle(dimensionName);
			dPref.setKey(dimensionName);
			dPref.setIntent(intent);
			getPreferenceScreen().addPreference(dPref);
        }*/
    }


    @Override
    protected void onResume() {
        super.onResume();
    }

	
    @Override
    public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {


		return false;
    }

    public boolean onPreferenceChange(Preference preference, Object objValue) {
        final String key = preference.getKey();
        return true;
    }



}
